home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 20 / Cream of the Crop 20 (Terry Blount) (1996).iso / os2 / ftree10f.zip / Birthday.ftx < prev    next >
Text File  |  1996-05-20  |  2KB  |  79 lines

  1. /*
  2.    Family Tree Rexx Script FTX
  3.  
  4.    Copyright (C) 1996 by <Nils Meier>
  5.  
  6.    Please send comments to / Kommentar bitte an
  7.         meier2@athene.informatik.uni-bonn.de
  8.  
  9.    <This script shows all birthdays of every person in the tree
  10.     / Dieses Skript zeigt alle Geburtstage der Menschen im Stammbaum>
  11.  
  12. */
  13.  
  14. /* ----------------------- Params  /  Parameter ------------------- */
  15.  
  16. namewidth=32
  17. datewidth=14
  18. namewidth=datewidth+30
  19.  
  20. IF getLanguage()='Deutsch' THEN DO
  21.    header    = 'Geburtstagsliste (Alter am nächsten Geburtstag) '
  22. END
  23. ELSE DO
  24.    header    = 'Birthday List (age at next birthday) '
  25. END
  26.  
  27.  
  28. /* ----------------- Display Header / Kopf der Ausgabe ------------- */
  29.  
  30. SAY(header||DATE())
  31. SAY(................................................)
  32.  
  33.  
  34. /* ------------------------------ Output / Ausgabe ----------------- */
  35.  
  36. /* Sort Perons by Birth Month,Day  /  Menschen sortieren nach Geburtsmonat,Tag */
  37. rc=sortPersons('BM,BD')
  38.  
  39. /* Calculate actual year  /  Berechne aktuelles Jahr  */
  40. thisyear=WORD(DATE(),3)
  41.  
  42. /* Display persons in tree / Anzeigen der Menschen im Baum*/
  43.  
  44. rc=selectPerson('F')
  45. DO UNTIL rc=0
  46.  
  47.    /* Get month of Birth  /  Geburtstagmonat */
  48.    result=getBirthDate('m')
  49.  
  50.    /* Only if month is given / Nur wenn Monat bekannt */
  51.    IF result<>'?' THEN DO
  52.  
  53.       /* Get Day of Birth  /  Geburtstag */
  54.       day=getBirthDate('D')
  55.       IF day<>0 THEN
  56.          result=result||' '||day
  57.       result=LEFT(result,datewidth)
  58.  
  59.       /* Add Name,First name  /  plus Name,Vorname */
  60.       result=result||getName()||','||getFirstName()
  61.       result=LEFT(result,namewidth)
  62.  
  63.       /* Age this year  /  Alter in diesem Jahr */
  64.       year=getBirthDate('Y')
  65.       IF year<>0 THEN
  66.          result=result||' ('||thisyear-year||')'
  67.  
  68.       /* Output  /  Ausgabe */
  69.       SAY(result)
  70.    END
  71.  
  72.    /* Next one  /  Naechster */
  73.    rc=selectPerson('N')
  74. END
  75.  
  76. /* Done  /  Fertig */
  77. RETURN
  78.  
  79.